
<!DOCTYPE html>
<html lang="zh-CN" xmlns="http://www.w3.org/1999/html">
<head>
    <title>充值卡充值</title>
    <link rel="shortcut icon" href="/static/favicon.ico" type="image/x-icon">
    <link rel="stylesheet" type="text/css" href="/static/css/public.css?v202204271231">
    <link rel="stylesheet" type="text/css" href="/static/qdxwx/css/global.css?v202204271231">
    <link rel="stylesheet" type="text/css" href="/static/libs/layui-v2.6.8/css/layui.css" />
    <script type="text/javascript" src="/static/libs/jquery/jquery-3.6.0.min.js"></script>
    <script type="text/javascript" src="/static/libs/layui-v2.6.8/layui.js"></script>
</head>
<body>
    <div class='d-tips-10'>
        <ul class='l-r-w-Inpt'>
            <li>
                <label class='vam'>卡号：</label>
                <input type='text' id='couponCode' name='' value='' class='lTxt'>
            </li>
            <li class='mt20'>
                <label class='vam'>密码：</label>
                <input type='text' id='couponPwd' name='' value='' class='lTxt'>
            </li>
            <li class='mt30 btn-list tac'>
                <label class='vam'>&nbsp;</label>
                <span class='mr20'>
                    <input type='button' class="layui-btn layui-btn-normal" onclick="recharge()" value='确 定'>
                </span>
            </li>
        </ul>
    </div>
    <script type="text/javascript">
        function recharge() {
            /*充值卡卡号*/
            var couponCode = $("#couponCode").val();
            /*充值卡密码*/
            var couponPwd = $("#couponPwd").val();
            $.ajax({
                url: "/user/account/recharge.json",
                post: "post",
                data: {"couponCode": couponCode, "couponPwd": couponPwd},
                success: function (result) {
                    if (result.code === 0) {
                        return layer.msg("恭喜您，充值卡使用成功！", {time: 1000}, function () {
                            location.href = '/user/account.html';
                        });
                    } else {
                        return layer.msg("由于以下原因，使用失败：" + result.msg);
                    }
                }
            });
        }
    </script>
    </body>
    </html>